package com.chl.sort.other;
/**
 * 冒泡排序
 * @author chl
 *
 */
public class Sort01Bubble {
	public static void sort(int[] arrs) {
		int l = arrs.length;
		int tmp;
		for (int i = 1; i < l; i++) {
			for (int j = l - 1; j > 0; j--) {
				if (arrs[j - 1] > arrs[j]) {
					tmp = arrs[j];
					arrs[j] = arrs[j - 1];
					arrs[j - 1] = tmp;
				}
			}
		}
	}
}
